package error;

import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.JavaDelegate;
import org.apache.log4j.Logger;

public class Transmit implements JavaDelegate{
	private static Logger logger = Logger.getLogger(Transmit.class);
	public void execute(DelegateExecution arg0) throws Exception {
		logger.info("Transmit");
		arg0.setVariable("transmit", false);
		String transmitTo=(String)arg0.getVariable("transmitTo");
		if(transmitTo==null || transmitTo.isEmpty()) // ak nic tak otoci
		{
			arg0.setVariable("transmitTo", arg0.getVariable("lastStarted"));
		}		
	}
}
